package cn.iocoder.yudao.module.data.service.provider;


import cn.iocoder.yudao.module.data.service.text2sql.pojo.ChatModelConfig;
import cn.iocoder.yudao.module.data.service.text2sql.pojo.s2sql.LLMReq;
import cn.iocoder.yudao.module.data.service.text2sql.pojo.s2sql.LLMResp;
import dev.langchain4j.model.chat.ChatLanguageModel;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * SqlGenStrategy abstracts generation step so that different LLM prompting strategies can be
 * implemented.
 */
public abstract class SqlGenStrategy  {

    public static final ChatModelConfig DEMO_CHAT_MODEL =
            ChatModelConfig.builder().provider("OPEN_AI").baseUrl("https://api.openai.com/v1")
                    .apiKey("demo").modelName("gpt-4o-mini").temperature(0.0).timeOut(60L).build();

    private static final Map<String, ModelFactory> factories = new HashMap<>();


    public abstract LLMResp generate(LLMReq llmReq);
}
